* {
    margin: 0px;
    padding: 0px;
}

body {
    background: #ccc;
}

.nav {
    margin: 50px;
    position: relative;
}

li {
    list-style: none;
}

a {
    text-decoration: none;
    color: white;
}

.nav>li {
    float: left;
}

.nav a {
    display: block;
    padding: 10px 30px;
    background: black;
    border-top: 1px solid black;
}

.nav a:hover {
    background: white;
    color: black;
    border-top: 1px solid red;
}

.subnav {
    position: absolute;
    display: none;
}